<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - DateSplitField Usage</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset-fonts/reset-fonts.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<!--[if IE 6]>
<link type='text/css' rel='stylesheet' href='../css/inputEx-IE6.css' />
<![endif]-->

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>

 <body>

<h1>inputEx - DateSplitField Usage</h1>


<!-- Example 1 -->
<div class='exampleDiv'>
	<h2>Basic DateSplitField creation</h2>
	<p>Use the following code to create a basic inputEx DateSplitField.</p>
	<div class='demoContainer' id='container1'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
					
					// Example 1
					var f = new inputEx.DateSplitField({label: 'Birthday', parentEl: 'container1', showMsg: true, required:true});

					f.updatedEvt.subscribe(function(e, params) {
						var val = params[0];
						YAHOO.util.Dom.get('container1').appendChild(inputEx.cn('div', null, null, 'Updated with value= '+val));
					});

					var div = YAHOO.util.Dom.get('container1');

					var button1 = inputEx.cn('button', null, null, "SetValue with today date");
					div.appendChild(button1);
					YAHOO.util.Event.addListener(button1, "click" ,function() { 
						f.setValue(new Date()); 
					});
					var button2 = inputEx.cn('button', null, null, "SetValue with empty string");
					div.appendChild(button2);
					YAHOO.util.Event.addListener(button2, "click" ,function() { 
						f.setValue(''); 
					});

					var button3 = inputEx.cn('button', null, null, "GetValue");
					div.appendChild(button3);
					YAHOO.util.Event.addListener(button3, "click" ,function() { 
						alert(f.getValue());
					});

					var button4 = inputEx.cn('button', null, null, "Clear");
					div.appendChild(button4);
					YAHOO.util.Event.addListener(button4, "click" ,function() { 
						f.clear();
					});
		</textarea>
	</div>
</div>


<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>


<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/Group.js"  type='text/javascript'></script>
<script src="../js/fields/StringField.js"  type='text/javascript'></script>
<script src="../js/fields/IntegerField.js"  type='text/javascript'></script>
<script src="../js/fields/CombineField.js"  type='text/javascript'></script>
<script src="../js/fields/DateSplitField.js"  type='text/javascript'></script>

<!-- inputEx examples -->
<script src="js/dpSyntaxHighlighter.js"></script>
<script src="inputex-examples.js"></script>

 </body>
</html>